<?php

namespace app\utils\ui\ele;

use app\utils\ui\UIView;
use app\utils\ui\vue\Base;
use app\utils\ui\vue\VueMethod;
use app\utils\ui\VueView;

class Pagination extends Base implements VueView{

    public function __construct($current_change_method,$current_page,$total=50,$pagesize=10,$layout='prev, pager, next')
    {
        $attr= [
            ':current-page'=>$current_page,
            'layout'=>$layout,
            ':total'=>$total,
            ':page-size'=>$pagesize
        ];
        if($current_change_method){
            $attr[ 'current-change']=VueMethod::method($current_change_method);
        }
        parent::__construct($attr,[]);
    }
    public function render(){
        return parent::base_render('el-pagination');
    }

}